function confirm_delete(){
	if (!confirm("Bạn có chắc chắn muốn xóa ?")){
		return false;
	}
	
	return true;
}

function hightlight_effect(obj){
	  var this_color = jQuery(obj).css("background-color");
      jQuery(obj).fadeTo("slow", 0.5,function(){
	      this.style.backgroundColor = '#E0F0FF';
	      jQuery(obj).fadeTo("slow", 1, function(){
	      	this.style.backgroundColor = this_color;
	      });
      })
}

function promt_error(msg){
	if(!msg){
		msg = 'Có lỗi xảy ra';
	}
	jQuery.prompt(
		'<span style="color:#DF0023;font-family:arial;">'+ msg +'</span>',
		{
			prefix:'cleanblue',
			opacity: 0.3,
			top: '35%',	
			overlayspeed: 'fast'								
		}
	); 

}

function selecte_all_checkbox(form_name)
{
	var frm_name = eval("document."+form_name);
	
	for (var i = 0; i < frm_name.elements.length; i++)
	{
		if (frm_name.elements[i].type == "checkbox")
		{
			frm_name.elements[i].checked = (frm_name.elements[i].checked==true)?false:true;

			try{
				document.getElementById('all_check_box').checked = (frm_name.elements[i].checked==true)?true:false;
			}
			catch (e){
							//Do nothing?
			}
		}
	}
}
